Lexicographic Listing and Ranking of t-Ary Trees

نویسنده

  • M. C. Er
چکیده

This paper presents three simple and efficient algorithms for generating, ranking and unranking t-ary trees in a lexicographic order. The simplest idea of encoding a t-ary tree with n nodes as a bit-string of length t*n is exploited to its full advantages. It is proved that the lexicographic order in the set of t-ary trees with n nodes is preserved in the set of bit-strings of length t*n, using the above encoding scheme. Thus by generating all bit-strings in the lexicographic order, a simple decoding algorithm can convert them to t-ary trees in the same order. Finally, the theoretical basis for ranking a lexicographic listing of bit-strings is discussed, and the ranking and the unranking algorithms are derived.

منابع مشابه

Lexicographic Listing and Ranking of r-ary Trees

This paper presents three simple and efficient algorithms for generating, ranking and unranking t-ary trees in a lexicographic order. The simplest idea of encoding a t-ary tree with n nodes as a bit-string of length t*n is exploited to its full advantages. It is proved that the lexicographic order in the set of t-ary trees with n nodes is preserved in the set of bit-strings of length t*n, using...

متن کامل

Ranking and Unranking of t-Ary Trees Using RD-Sequences

In this paper, we introduce a concise representation, called right-distance sequences (or RD-sequences for short), to describe all t-ary trees with n internal nodes. A result reveals that there exists a close relationship between the representation and the well-formed sequences suggested by Zaks [Lexicographic generation of ordered trees, Theoretical Computer Science 10 (1980) 63–82]. Using a c...

متن کامل

Parallel Generation of t-ary Trees

A parallel algorithm for generating t-ary tree sequences in reverse B-order is presented. The algorithm generates t-ary trees by 0-1 sequences, and each 0-1 sequences is generated in constant average time O(1). The algorithm is executed on a CREW SM SIMD model, and is adaptive and cost-optimal. Prior to the discussion of the parallel algorithm a new sequential generation with O(1) average time ...

متن کامل

Parallel Generation of t-Ary Trees in A-order

We present a cost-optimal and adaptive parallel algorithm for generating t-ary trees in A-order. The generation is based on an encoding using integer sequences (z-sequences) due to Zaks [(1980), Lexicographic generation of ordered tree. Theor. Comput. Sci., 10, 63–82]. Our algorithm is the first introduced parallel generation algorithm, which generates t-ary trees in A-order in the literature. ...

متن کامل

On Parallel Generation of t-Ary Trees in an Associative Model

In this paper a new parallel algorithm is presented for generation of t–ary trees. Computations run in an associative processor model. Tree sequences are generated in lexicographic order, with O(1) time per object, in a new representation, as combinations with repetitions with restricted growth. The corresponding full t–ary trees (x–sequences) appear in antilexicographic order.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

متن کامل
عنوان ژورنال:
  • Comput. J.

دوره 30  شماره 

صفحات  -

تاریخ انتشار 1987